//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit4.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm4 *Form4;
//---------------------------------------------------------------------------
__fastcall TForm4::TForm4(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm4::Button1Click(TObject *Sender)
{
 AnsiString an1=" select * from glyb where ";
 if(Edit1->Text!="")
  an1+="gno='"+Edit1->Text+"' and " ;
 if(Edit2->Text!="")
  an1+="gname='"+Edit2->Text+"' and " ;
  an1+="'1'='1' ";
  ShowMessage(an1);
  ADOQuery1->SQL->Clear();
  ADOQuery1->SQL->Add(an1);
  // ShowMessage(an1);
  ADOQuery1->Open();

}
//---------------------------------------------------------------------------

